import request from '@/utils/request'

var url = process.env.VUE_APP_SUM_PUB;


//上传或修改游戏版本
export function Add(data) {
  return request({
    url: url + '/game/version/add',
    method: 'post',
    data: data
  })
}



//游戏版本拖拽排序
export function VersionSort(data) {
  return request({
    url: url + '/game/version/version-sort',
    method: 'post',
    data: data
  })
}

//上传资源
export function AddRes(data) {
  return request({
    url: url + '/game/resources/upload',
    method: 'post',
    data: data
  })
}


//查询资源版本列表
export function getResVeList(data) {
  return request({
    url: url + '/game/resources/list',
    method: 'post',
    data: data
  })
}


//资源应用
export function ResVeUse(data) {
  return request({
    url: url + '/game/resources/use',
    method: 'post',
    data: data
  })
}

//资源删除
export function ResVeDelete(data) {
  return request({
    url: url + '/game/resources/delete',
    method: 'post',
    data: data
  })
}


//资源上次更新时间
export function LastUpdatedTime(data) {
  return request({
    url: url + '/game/resources/info',
    method: 'post',
    data: data
  })
}





export function Update(data) {
  return request({
    url: url + '/tool-server/database/modify',
    method: 'post',
    data: data
  })
}



export function getList(data) {
  return request({
    url: url + '/game/version/list',
    method: 'post',
    data: data
  })
}




export function Show(data) {
  return request({
    url: url + '/tool-server/database/detail',
    method: 'post',
    data: data
  })
}

// 删除数据库配置
export function Delete(data) {
  return request({
    url: url + '/tool-server/database/delete',
    method: 'post',
    data: data
  })
}


//获取引擎列表
export function engineList(data) {
  return request({
    url: url + '/database-engine/label-list',
    method: 'post',
    data: data
  })
}


//获取引擎列表
export function generateConfig(data) {
  return request({
    url: url + '/lander/generate-config',
    method: 'post',
    data: data
  })
}



//重置密钥
export function modifySecret(data) {
  return request({
    url: url + '/game/version/modify-secret',
    method: 'post',
    data: data
  })
}

